import React from 'react'
import { homeRouter } from '../../router/Index'
import { useNavigate,Outlet } from 'react-router-dom'
import { Badge, TabBar } from 'antd-mobile'
function Index() {
    let navigate=useNavigate()
  return (
    <div style={{width:'100%',height:'100%',display:'flex',flexDirection:'column'}}>
      <main
      style={{flex:1,overflowY:'scroll'}}
      ><Outlet></Outlet></main>
      <footer style={{height:'50px'}}>
        <TabBar onChange={(key)=>navigate(key)}>
          {homeRouter.map(item => (
            <TabBar.Item key={item.path} title={item.title} />
          ))}
        </TabBar>
      </footer>
    </div>
  )
}

export default Index
